﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ProductsGUI.Models;
using ProductsGUI.Core;
using Common.Framework.GlobalEntities;
using Common.Framework.GlobalEntities.DTO;

namespace ProductsGUI.Controllers
{
    public class HomeController : Controller
    {       
        public ActionResult Index()
        {
            ViewBag.Message = ServiceManager.Instance.GilService.DoWork();
            return View();
        }

        public ActionResult About()
        {            
            LookupTableDTO lookup =  ClientCacheManager.Instance.GetLookupTable("Test");
            TestSelect test = new TestSelect() { selectList = lookup.ToSelectList() };
            LookupTableDTO lookupsql =  ClientCacheManager.Instance.GetLookupTable("TestSQL");
            test.selectListSQL = lookupsql.ToSelectList();
            
            return View(test);
        }

        public ActionResult Products()
        {
          
             return View();
        }

        public class TestSelect
        {
            public SelectList selectList;
            public SelectList selectListSQL;
        }
    }
}
